<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改员工基础信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-baseinfo-edit" th:object="${staffBaseinfo}">
            <input name="stfId" th:field="*{stfId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">姓名：</label>
                <div class="col-sm-8">
                    <input name="stfName" th:field="*{stfName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">证件号：</label>
                <div class="col-sm-8">
                    <input name="idCard" th:field="*{idCard}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">手机号码：</label>
                <div class="col-sm-8">
                    <input name="phoneNumber" th:field="*{phoneNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">部门：</label>
                <div class="col-sm-8">
                    <input name="stfDep" th:field="*{stfDep}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">职位：</label>
                <div class="col-sm-8">
                    <input name="stfPosition" th:field="*{stfPosition}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">学校：</label>
                <div class="col-sm-8">
                    <input name="stfSchool" th:field="*{stfSchool}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">专业：</label>
                <div class="col-sm-8">
                    <input name="stfMajor" th:field="*{stfMajor}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">毕业时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="stfEndDate" th:value="${#dates.format(staffBaseinfo.stfEndDate, 'yyyy-MM-dd')}" class="time-input form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">学历：</label>
                <div class="col-sm-8">
                    <select name="stfDegree" class="form-control" type="text" th:with="type=${@dict.getType('staff_degree_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{stfDegree}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">学位：</label>
                <div class="col-sm-8">
                    <select name="stfDiploma" class="form-control" type="text" th:with="type=${@dict.getType('staff_diploma_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{stfDiploma}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">合同中止日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="stfContractEndDate" th:value="${#dates.format(staffBaseinfo.stfContractEndDate, 'yyyy-MM-dd')}" class="time-input form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">社保卡卡号：</label>
                <div class="col-sm-8">
                    <input name="socialSecurityId" th:field="*{socialSecurityId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">公积金账号：</label>
                <div class="col-sm-8">
                    <input name="accumulationFundId" th:field="*{accumulationFundId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">紧急联系人：</label>
                <div class="col-sm-8">
                    <input name="emergencyContact" th:field="*{emergencyContact}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">婚姻状态：</label>
                <div class="col-sm-8">
                    <select name="maritalStatus" class="form-control" type="text" th:with="type=${@dict.getType('marital_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{maritalStatus}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">入职时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
<!--                        <input name="stfHiredate" th:value="${#dates.format(staffBaseinfo.stfHiredate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                        <input name="stfHiredate" th:value="${#dates.format(staffBaseinfo.stfHiredate, 'yyyy-MM-dd')}" class="time-input form-control" placeholder="入职时间" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否入党：</label>
                <div class="col-sm-8">
                    <select name="isParty" class="form-control" type="text" th:with="type=${@dict.getType('staff_party_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isParty}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入党时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input autocomplete="off" type="text" class="time-input form-control" id="partyTime" placeholder="入党时间" name="partyTime" th:value="${#dates.format(staffBaseinfo.partyTime, 'yyyy-MM-dd')}"/>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">所属项目：</label>
                <div class="col-sm-8">
                    <select id="projectId" name="projectId" class="form-control" th:field="*{projectId}">
                        <option value="">-----请选择-----</option>
                        <option th:each="sysProject : ${sysProjectList}" th:text="${sysProject.projectName}" th:value="${sysProject.projectId}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "staff/baseinfo";
        $("#form-baseinfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-baseinfo-edit').serialize());
            }
        }

        $("input[name='stfEnrollDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='stfEndDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='stfContractEndDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='stfHiredate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>